/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package docking;

import java.io.Serializable;
import java.util.ArrayList;

/**
 *
 * @author DJH
 */
public class Pier implements Serializable {
    private String name;
    private int price;
    private int lengthOfBlock;
    private int length;
    private ArrayList<Reservation> reservationList;
    
    public Pier(String name, int price, int lengthOfBlock, int length)
    {
        this.lengthOfBlock = lengthOfBlock;
        this.length = length;
        this.name = name;
        this.price = price;
        reservationList = new ArrayList<Reservation>();
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    
    public String toString()
    {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the price
     */
    public int getPrice() {
        return price;
    }

    /**
     * @param price setur prísin pr block
     */
    public void setPrice(int price) {
        this.price = price;
    }

   
    /**
     * @return the reservationList
     */
    public ArrayList<Reservation> getReservationList() {
        return reservationList;
    }

   public void addReservation(Reservation r)
   {
       reservationList.add(r);
   }

    /**
     * @return the lengthOfBlock
     */
    public int getLengthOfBlock() {
        return lengthOfBlock;
    }

    /**
     * @param lengthOfBlock the lengthOfBlock to set
     */
    public void setLengthOfBlock(int lengthOfBlock) {
        this.lengthOfBlock = lengthOfBlock;
    }

    /**
     * @return the length
     */
    public int getLength() {
        return length;
    }

    /**
     * @param length the length to set
     */
    public void setLength(int length) {
        this.length = length;
    }

}